package com.project.personnel.tools;

/**
 * 分页工具类
 *
 */
public class PageUtilzts {
    //总记录数
    private int totalCount;
    //每页显示多少条数据（5条）
    private int pageSize=5;
    //总页数
    private int totalPageCount;
    //当前页
    private int pageIndex;

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
        if(totalCount % pageSize ==0){
            this.totalPageCount=totalCount/pageSize;
        }else{
            this.totalPageCount=totalCount/pageSize+1;
        }
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotalPageCount() {
        return totalPageCount;
    }

    public void setTotalPageCount(int totalPageCount) {
        this.totalPageCount = totalPageCount;
    }

    public int getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(int pageIndex) {
        this.pageIndex = pageIndex;
    }


}
